import http from "../../utils/requestAI.ts"; // 修正拼写错误
import type { addPrems } from "./type.ts";
// import  { type editPrems } from "../section/type.ts";
import { type ExampleGenerate, type Data } from "./type.ts";
// import { type addPrems } from "./type.ts";

// 列表
export const getnursingService = (params?: Data) => {
  return http.get<ExampleGenerate>('/nursingService/list', params);
}

// 删除
export const delnursingService = (id: number) => {
  console.log('删除1111', id);
  return http.delete(`/nursingService/delete/${id}`);
}

export const delnursingServiceAll = (ids: number[]) => {
  console.log('批量删除执行', ids);
  return http.post(`/nursingService/deleteAll`,ids);
}

// 添加
export const addnursingService = (data: addPrems) => {
    return http.post(`/nursingService/add`, data);
  }
  
//   // 修改
//   export const editPremsd = (data: editPrems) => {
//     return http.post(`/role/add`, data);
//   }

// //// 编辑
//   export const editCompany = (id: number) => {
//     return http.get(`/role/get/${id}`);
//   }
  